:root {
  --color-bg: #FAF7F2;
  --color-surface: #FFFFFF;

  --color-primary: #8B5A2B;
  --color-primary-hover: #6F451F;

  --color-accent: #E8A96B;
  --color-accent-soft: #F3D2B3;

  --color-text: #2B2B2B;
  --color-text-light: #6B6B6B;

  --color-border: #E5DED5;
}

/* =========================
   LAYOUT
========================= */

.profile-layout{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
}

.profile-content{
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* =========================
   PROFILE CARD
========================= */

.profile-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  padding: 25px;
  border-radius: 18px;

  background: var(--color-surface);
  border: 1px solid var(--color-border);

  box-shadow: 0 10px 25px rgba(0,0,0,.04);
  transition: .25s;
  flex-wrap: wrap;
}

.profile-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,.08);
}

/* =========================
   AVATAR
========================= */

.profile-avatar{
  position: relative;
  flex-shrink: 0;
}

.profile-avatar img{
  width: 85px;
  height: 85px;
  border-radius: 50%;
  object-fit: cover;

  border: 3px solid var(--color-accent-soft);
  box-shadow: 0 6px 15px rgba(0,0,0,.08);
}

.status{
  position: absolute;
  bottom: 6px;
  right: 6px;

  width: 12px;
  height: 12px;

  background: #4CAF50;
  border-radius: 50%;
  border: 2px solid #fff;
}

/* =========================
   INFO BLOCK
========================= */

.profile-info{
  flex: 1;
  min-width: 220px;
}

.profile-info h2{
  font-size: 20px;
  margin-bottom: 6px;
}

.profile-info p{
  font-size: 14px;
  color: var(--color-text-light);
  margin: 3px 0;
}

.profile-meta{
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 8px;
}

/* ROLE */
.profile-role{
  display: inline-block;
  margin-top: 10px;

  padding: 4px 10px;
  font-size: 12px;

  background: var(--color-accent-soft);
  color: var(--color-primary);

  border-radius: 8px;
}

/* =========================
   ALERTS (EMAIL)
========================= */

.alert-warning{
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;

  background: #fff3e0;
  color: #ef6c00;
  font-size: 13px;
}

.alert-success{
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;

  background: #e8f5e9;
  color: #2e7d32;
  font-size: 13px;
}

/* =========================
   ACTION BUTTONS
========================= */

.profile-actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

/* base button */
.btn-primary,
.btn-secondary,
.btn-danger{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 10px;

  font-size: 14px;
  cursor: pointer;
  text-decoration: none;

  transition: .2s;
}

/* primary */
.btn-primary{
  background: var(--color-primary);
  color: #fff;
  border: none;
}

.btn-primary:hover{
  background: var(--color-primary-hover);
}

/* secondary */
.btn-secondary{
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover{
  background: var(--color-bg);
}

/* danger */
.btn-danger{
  background: #e76f51;
  color: #fff;
  border: none;
}

.btn-danger:hover{
  background: #d65a3f;
}

/* =========================
   ORDERS
========================= */

.orders{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-card{
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;

  padding: 20px;
  transition: .25s;
}

.order-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0,0,0,.08);
}

.order-card__top{
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.order-id{
  font-size: 18px;
  font-weight: 600;
}

.order-date{
  font-size: 13px;
  color: var(--color-text-light);
}

.order-card__body{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.order-actions{
  display: flex;
  gap: 10px;
}

/* status */
.order-status{
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.status-new{ background:#e3f2fd; color:#1976d2; }
.status-processing{ background:#fff3e0; color:#ef6c00; }
.status-completed{ background:#e8f5e9; color:#2e7d32; }
.status-cancelled{ background:#ffebee; color:#c62828; }

/* =========================
   ADDRESS GRID
========================= */

.addresses-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 20px;
}

.address-card{
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;

  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  transition: .25s;
}

.address-card:hover{
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,.08);
}

.address-card-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.address-card-top h3{
  font-size: 18px;
}

.address-text{
  font-size: 15px;
  color: var(--color-text);
}

.address-text-light{
  font-size: 14px;
  color: var(--color-text-light);
}

.badge{
  background: var(--color-accent-soft);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.address-actions{
  display: flex;
  gap: 10px;
  margin-top: auto;
}

/* empty */
.empty-state,
.empty-block{
  text-align: center;
  padding: 40px;

  background: var(--color-bg);
  border-radius: 18px;
}

/* =========================
   MODAL
========================= */

.modal{
  display: none;
  position: fixed;
  inset: 0;

  background: rgba(0,0,0,.6);
  z-index: 999;
}

.modal-content{
  width: 420px;
  max-width: 95%;

  background: #fff;
  margin: 8% auto;

  border-radius: 14px;
  padding: 20px;

  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.modal-header{
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.modal-close{
  font-size: 24px;
  border: none;
  background: none;
  cursor: pointer;
}

/* form */
.form-grid{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row{
  display: flex;
  gap: 10px;
}

.form-group{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group input{
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.full-width{
  width: 100%;
  margin-top: 15px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px){

  .profile-layout{
    grid-template-columns: 1fr;
  }

  .profile-card{
    flex-direction: column;
    text-align: center;
  }

  .profile-actions{
    width: 100%;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger{
    width: 100%;
  }

  .order-card__body{
    flex-direction: column;
    align-items: flex-start;
  }

  .order-actions{
    width: 100%;
  }
}


.support-page{
    padding:20px 0;
}

.support-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.support-create-btn{
    background:#111;
    color:#fff;
    padding:12px 18px;
    border-radius:10px;
    text-decoration:none;
}

.support-list{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.support-item{
    display:block;
    padding:20px;
    border-radius:16px;
    background:#fff;
    border:1px solid #eee;
    text-decoration:none;
    color:#111;
    transition:.2s;
}

.support-item:hover{
    transform:translateY(-2px);
    border-color:#ddd;
}

.support-item-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.support-subject{
    font-size:18px;
    font-weight:700;
}

.support-status{
    font-size:12px;
    padding:5px 10px;
    border-radius:20px;
    color:#fff;
}

.support-status.open{
    background:#22c55e;
}

.support-status.waiting{
    background:#f59e0b;
}

.support-status.closed{
    background:#ef4444;
}

.support-last-message{
    color:#666;
    margin-bottom:12px;
}

.support-meta{
    display:flex;
    justify-content:space-between;
    font-size:13px;
    color:#999;
}

.support-empty{
    padding:40px;
    text-align:center;
    border-radius:16px;
    background:#fff;
    border:1px solid #eee;
}



/* =========================
   LAYOUT
========================= */

.support-chat-page{
    display:flex;
    gap:20px;
    height:80vh;
    margin-top:20px;
}

/* =========================
   SIDEBAR
========================= */

.support-sidebar{
    width:320px;
    background:#fff;
    border:1px solid #eee;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.support-sidebar-header{
    padding:18px;
    border-bottom:1px solid #eee;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.support-sidebar-header h2{
    font-size:18px;
    margin:0;
}

.support-sidebar-header a{
    font-size:13px;
    color:#555;
    text-decoration:none;
}

.support-sidebar-list{
    overflow-y:auto;
    flex:1;
}

.support-sidebar-item{
    display:block;
    padding:14px 16px;
    border-bottom:1px solid #f5f5f5;
    text-decoration:none;
    color:#111;
    transition:.2s;
}

.support-sidebar-item:hover{
    background:#fafafa;
}

.support-sidebar-item.active{
    background:#f1f5f9;
}

.support-sidebar-subject{
    font-weight:600;
    font-size:14px;
}

.support-sidebar-message{
    font-size:12px;
    color:#777;
    margin-top:4px;
}

/* =========================
   CHAT CONTAINER
========================= */

.support-chat{
    flex:1;
    background:#fff;
    border:1px solid #eee;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

/* HEADER */

.support-chat-header{
    padding:18px;
    border-bottom:1px solid #eee;
}

.support-chat-header h2{
    margin:0;
    font-size:18px;
}

.support-chat-status{
    margin-top:5px;
    font-size:13px;
    color:#777;
}

.support-chat-status .open{
    color:#22c55e;
    font-weight:600;
}

.support-chat-status .waiting{
    color:#f59e0b;
    font-weight:600;
}

.support-chat-status .closed{
    color:#ef4444;
    font-weight:600;
}

/* =========================
   MESSAGES
========================= */

.support-messages{
    flex:1;
    overflow-y:auto;
    padding:20px;
    background:#f8fafc;
    display:flex;
    flex-direction:column;
    gap:12px;
}

/* MESSAGE WRAPPER */
.support-message{
    display:flex;
}

/* LEFT / RIGHT ALIGN */
.support-message.user{
    justify-content:flex-end;
}

.support-message.support{
    justify-content:flex-start;
}

/* BUBBLE */
.support-message-content{
    max-width:65%;
    padding:12px 14px;
    border-radius:16px;
    background:#fff;
    border:1px solid #eee;
    box-shadow:0 1px 2px rgba(0,0,0,0.04);
}

/* USER MESSAGE STYLE */
.support-message.user .support-message-content{
    background:#111;
    color:#fff;
    border:none;
}

/* AUTHOR */
.support-message-author{
    font-size:11px;
    opacity:.6;
    margin-bottom:6px;
}

/* TEXT */
.support-message-text{
    font-size:14px;
    line-height:1.4;
    word-break:break-word;
}

/* TIME */
.support-message-time{
    font-size:10px;
    opacity:.5;
    margin-top:6px;
}

/* =========================
   EMPTY STATE
========================= */

.support-empty-chat{
    text-align:center;
    color:#888;
    margin-top:40px;
}

/* =========================
   FORM
========================= */

.support-form{
    display:flex;
    gap:10px;
    padding:15px;
    border-top:1px solid #eee;
    background:#fff;
}

.support-form textarea{
    flex:1;
    resize:none;
    height:50px;
    padding:10px;
    border-radius:12px;
    border:1px solid #ddd;
    outline:none;
    font-size:14px;
}

.support-form button{
    width:130px;
    border:none;
    border-radius:12px;
    background:#111;
    color:#fff;
    cursor:pointer;
    transition:.2s;
}

.support-form button:hover{
    opacity:.85;
}

/* CLOSED */
.support-chat-closed{
    padding:20px;
    text-align:center;
    color:#888;
    border-top:1px solid #eee;
    background:#fff;
}

